<template>
  <div>
    <t-config-provider :globalConfig=zhConfig>
      <div id="app">
        <router-view :class="[mode]"/>
      </div>
    </t-config-provider>
  </div>
</template>
<script>
import Vue from 'vue';
import config from '@/config/style';
import zhConfig from 'tdesign-vue/es/locale/zh_CN';

export default Vue.extend({
  data(){
    return {
      zhConfig: zhConfig
    }
  },
  computed: {
    mode() {
      return this.$store.getters['setting/mode'];
    },
  },
  mounted() {
    this.$store.dispatch('setting/changeTheme', { ...config });
  },
});
</script>
